#

| Chapter 3 The UNIX Shell: An Overview |

## 3.3 Shell Flavors

Many different UNIX shells are available. This quick reference describes the three most popular shells:

- The Bourne (or standard) shell, the most compact shell but also the simplest.

- The Korn shell, a superset of the Bourne shell that lets you edit the command line.

- The C shell, which uses C syntax and has many conveniences.

Most systems have more than one shell, and people will often use the Bourne shell for writing shell scripts and will use another shell for interactive use.

The /etc/passwd file determines which shell takes effect during your interactive UNIX session. When you log in, the system checks your entry in /etc/passwd. The last field of each entry calls a program to run as the default shell. For example:

If the program | Your shell will be the:
--- | ---
name is: |
/bin/sh | Bourne shell
/bin/rsh | Restricted Bourne shell
/bin/jsh | Bourne shell, including job control
/bin/ksh | Korn shell
/bin/rksh | Restricted Korn shell
/bin/csh | C shell

You can change to another shell by typing the program name at the command line. For example, to change from the Bourne shell to the C shell, type:

>     $ exec csh

3.2 Purpose of the Shell |  | 3.4 Common Features